package xyz.lilei23.framework.aop;

import net.sf.cglib.proxy.Enhancer;

/**
 * @author jack
 * @date 31/07/2021 16:20
 * @version 1.0
 **/
public class ProxyFactory {

    /**
     * 使用cglib动态代理生成代理对象
     * @param obj 委托对象
     * @return
     */
    public Object getCglibProxy(Object obj, MethodInterceptor methodInterceptors) {
        return Enhancer.create(obj.getClass(),methodInterceptors);
    }
}
